/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package MODEL;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Observable;

/**
 *
 * @author Irene
 */
public class Dietplan extends Observable implements Serializable {

   
    private ArrayList<String> monday;
    private ArrayList<String> tuesday;
    private ArrayList<String> wednesday;
    private ArrayList<String> thursday;
    private ArrayList<String> friday;
    private ArrayList<String> saturday;
    private ArrayList<String> sunday;
    private ArrayList<String> standard;
    

    public Dietplan() {
        monday = new ArrayList<String>();
        tuesday = new ArrayList<String>();
        wednesday = new ArrayList<String>();
        thursday = new ArrayList<String>();
        friday = new ArrayList<String>();
        saturday = new ArrayList<String>();
        sunday = new ArrayList<String>();
        standard = new ArrayList<String>();
 

    }
    /*Adds food to monday via a list of meals and notifies observers
     * @param meals is the list.
     */
    public void addMondayFood(List<String> meals) {
        meals.removeAll(monday);
        monday.addAll(meals);
        setChanged();
        notifyObservers();
    }

    public void addTuesdayFood(List<String> meals) {
        meals.removeAll(tuesday);
        tuesday.addAll(meals);

        setChanged();
        notifyObservers();


    }

    public void addWednesdayFood(List<String> meals) {
        meals.removeAll(wednesday);
        wednesday.addAll(meals);

        setChanged();
        notifyObservers();



    }

    public void addThursdayFood(List<String> meals) {
        meals.removeAll(thursday);
        thursday.addAll(meals);
        setChanged();
        notifyObservers();



    }

    public void addFridayFood(List<String> meals) {
        meals.removeAll(friday);
        friday.addAll(meals);
        setChanged();
        notifyObservers();
    }

    public void addSaturdayFood(List<String> meals) {
        meals.removeAll(saturday);
        saturday.addAll(meals);
        setChanged();
        notifyObservers();

    }

    public void addSundayFood(List<String> meals) {
        meals.removeAll(sunday);
        sunday.addAll(meals);
        setChanged();
        notifyObservers();


    }

    /*Adds food to a standardlist via meals and notifies observers
     * @param meals is the list to be added
     */
    public void addToStandard(List<String> meals) {
        standard.addAll(meals);
        setChanged();
        notifyObservers();

    }

    /*removes the string fromstandard
     * @param meal is the string it removes
     */ 
    public void removeFromStandard(String meal) {
        standard.remove(meal);
        setChanged();
        notifyObservers();

    }

    public void removeMondayMeal(String s) {
        monday.remove(s);
        setChanged();
        notifyObservers();

    }

    public void removeTuesdaydayMeal(String s) {
        tuesday.remove(s);
        setChanged();
        notifyObservers();

    }

    public void removeWednesdayMeal(String s) {
        wednesday.remove(s);
        setChanged();
        notifyObservers();

    }

    public void removeThursdayMeal(String s) {
        thursday.remove(s);
        setChanged();
        notifyObservers();

    }

    public void removeFridayyMeal(String s) {
        friday.remove(s);
        setChanged();
        notifyObservers();
    }

    public void removeSaturdayMeal(String s) {
        saturday.remove(s);
        setChanged();
        notifyObservers();

    }

    public void removeSundayMeal(String s) {
        sunday.remove(s);
        setChanged();
        notifyObservers();

    }

    public ArrayList<String> getFriday() {
        return friday;
    }

    public ArrayList<String> getTuesday() {
        return tuesday;
    }

    public ArrayList<String> getMonday() {
        return monday;
    }

    public ArrayList<String> getSaturday() {
        return saturday;
    }

    public ArrayList<String> getStandard() {
        return standard;
    }

    public ArrayList<String> getSunday() {

        return sunday;
    }

    public ArrayList<String> getThursday() {
        return thursday;
    }

    public ArrayList<String> getWednesday() {
        return wednesday;
    }
}
